From cb4e4bb2db8fe556a2ece742cfb364c0f3e7c807 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Tue, 9 Jul 2013 23:15:02 +0200 Subject: [PATCH] appDisplay: Use hookup_style() to bind app-view-controls spacing With the monkey-patched ClutterBoxLayout, we no longer need this code to hook up the 'spacing' property to CSS. https://bugzilla.gnome.org/show_bug.cgi?id=703905 --- js/ui/appDisplay.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 144419cec..9132d18b9 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -358,17 +358,6 @@ const ControlsBoxLayout = Lang.Class({ let totalSpacing = this.spacing * (childrenCount - 1); return [maxMinWidth * childrenCount + totalSpacing, maxNaturalWidth * childrenCount + totalSpacing]; - }, - - vfunc_set_container: function(container) { - if(this._styleChangedId) { - this._container.disconnect(this._styleChangedId); - this._styleChangedId = 0; - } - if(container != null) - this._styleChangedId = container.connect('style-changed', Lang.bind(this, - function() { this.spacing = this._container.get_theme_node().get_length('spacing'); })); - this._container = container; } }); @@ -416,8 +405,9 @@ const AppDisplay = new Lang.Class({ this.actor.add(this._viewStack, { expand: true }); let layout = new ControlsBoxLayout({ homogeneous: true }); - this._controls = new St.Widget({ style_class: 'app-view-controls' }); - this._controls.set_layout_manager(layout); + this._controls = new St.Widget({ style_class: 'app-view-controls', + layout_manager: layout }); + layout.hookup_style(this._controls); this.actor.add(new St.Bin({ child: this._controls })); -- 2.39.5